<%--
  @author Kusal Samarakoon
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>


<script type="text/javascript">

    $(document).ready(function() {
        $('.land-table').dataTable({
            "sPaginationType": "full_numbers",
            "bDestroy": true,
            "oLanguage": {
                "sZeroRecords": $('#no-record').val(),
                "sLengthMenu": $('#display').val() + " _MENU_ " + $('#records').val(),
                "sSearch": $('#search').val(),
                "sInfo": $('#showing').val() + " _START_ " + $('#to').val() + " _END_ " + $('#of').val() + " _TOTAL_ " + $('#entries').val(),
                "sInfoEmpty": $('#no-record').val(),
                "oPaginate": {
                    "sFirst": $('#first').val(),
                    "sLast": $('#last').val(),
                    "sNext": $('#next').val(),
                    "sPrevious": $('#previous').val()
                }
            }
        });
    });

</script>





<div id="local-authority-home-title" class="module-home-title">
    <s:a href="localAuthorityModule.do"><img src="${pageContext.request.contextPath}/images/user.png"
                                   alt="Manage local Authority"><span><s:label
            value="%{getText('localAuthorityModule.label')}"/></span></s:a>
</div>


<table>
    <tr>
        <td colspan="2" class="left-align">
            <div class="action-msg"><s:actionmessage/></div>
            <div class="action-err"><s:actionerror/></div>
        </td>
    </tr>
</table>

<table class="width-100 margin-10-auto table land-table">
    <thead>
    <tr class="center-align table-header">
        <%--<th><s:label value="%{getText('id.label')}"/></th>--%>
        <th><s:label value="%{getText('authority_name.label')}"/></th>
        <th><s:label value="%{getText('authority_type_name.label')}"/></th>
        <th><s:label value="%{getText('edit.label')}"/></th>
        <th><s:label value="%{getText('delete.label')}"/></th>

    </tr>
    </thead>
    <tbody>
    <s:iterator status="status1" value="localAuthorityList">
        <tr>
            <%--<td class="center-align"><s:property value="id"/></td>--%>
            <td class="center-align"><s:property value="localAuthorityType.enName"/></td>
            <td><s:property value="siName"/></td>

                <td class="center-align">
                    <s:url id="updateLocalAuthorityForm" action="updateLocalAuthorityForm">
                        <s:param name="localAuthorityId" value="id"/>
                    </s:url>
                    <s:a href="%{updateLocalAuthorityForm}" title="%{getText('edit_tooltip')}">
                        <img src="<s:url value='/images/modify-form.png'/>" border="none" width="25"
                             height="25"/>
                    </s:a>
                </td>

            <td class="center-align">
                    <s:url id="deleteLocalAuthority" action="deleteLocalAuthority">
                        <s:param name="localAuthorityId" value="id"/>
                    </s:url>
                    <s:a href="%{deleteLocalAuthority}" title="%{getText('edit_tooltip')}">
                        <img src="<s:url value='/images/reject.png'/>" border="none" width="25"
                             height="25"/>
                    </s:a>
                </td>


        </tr>
    </s:iterator>
    </tbody>
</table>

<s:include value="../dataTableLocalizationLabels.jsp"/>
